import http from '../request.js'

// 获取分布式节点列表
let distNodeGetList = (url, params) => {
    return http.req(
        'get',
        url = 'live/distNode/getList',
        params,
        null
    )
}

// 获取分布式节点信息
let distNodeGetInfo = (url, nodeId) => {
    return http.req(
        'get',
        url = 'live/distNode/getInfo?nodeId='+nodeId,
        null,
        null
    )
}

// 获取在线直播列表
let getOnlineList = (url, params) => {
    return http.req(
        'get',
        url = 'live/distNode/getOnlineList',
        params,
        null
    )
}


// 新增分布式节点
let addDistNode = (url, data) => {
    return http.req(
        'post',
        url = 'live/distNode/add',
        null,
        data
    )
}

// 删除分布式节点
let deleteDistNode = (url, nodeId) => {
    return http.req(
        'delete',
        url = 'live/distNode/delete?nodeId='+nodeId,
        null,
        null
    )
}

// 修改分布式节点
let editDistNode = (url, data) => {
    return http.req(
        'put',
        url = 'live/distNode/edit',
        null,
        data
    )
}

// 获取聊天列表
let replayCommentGetList = (url, params) => {
    return http.req(
        'get',
        url = 'live/replayComment/getList',
        params,
        null
    )
}

export default {
    distNodeGetList,
    distNodeGetInfo,
    addDistNode,
    deleteDistNode,
    editDistNode,
    replayCommentGetList,
    getOnlineList
}